package com.ruoyi.cloudsyncfile.controller;

import com.ruoyi.cloudsyncfile.model.NetdiskFile;
import com.ruoyi.cloudsyncfile.service.impl.NetdiskFileServiceImpl;
import com.ruoyi.cloudsyncfile.utils.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class FileController {

    @Autowired
    NetdiskFileServiceImpl netdiskFileService;

    @RequestMapping("/info")
    public NetdiskFile getInfo() {
        return netdiskFileService.getById(1);
    }

    @RequestMapping("/upload")
    public BaseResult upload() {
       return netdiskFileService.upload();
    }
}
